# -*- python -*-
# ex: set syntax=python:
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# See master.experimental/slaves.cfg for documentation.

def mac():
  cq_slaves = (
      ['vm%d-m4' % i for i in range(682, 711)] +
      ['vm%d-a4' % i for i in range(53, 63)])
  cq_builders = [
      'mac_chromium_compile_dbg_ng',
      'mac_chromium_gn_dbg',
      'mac_chromium_gn_rel',
      'mac_chromium_gn_upload',
      'mac_chromium_rel_ng',
  ]

  optional_slaves = ['vm%d-m4' % i for i in [713, 723]]
  optional_builders = [
      'mac_chromium_10.6_rel_ng',
      'mac_chromium_asan_rel_ng',
      'mac_chromium_compile_rel_ng',
      'mac_chromium_dbg_ng',
      'mac_deterministic',
      'mac_nacl_sdk',
      'mac_nacl_sdk_build',
  ]

  out = []
  out.extend(
    {
      'master': 'TryServerChromiumMac',
      'builder': cq_builders,
      'hostname': slave,
      'os': 'mac',
      'version': '10.8',
      'bits': '64',
    } for slave in cq_slaves
  )
  out.extend(
    {
      'master': 'TryServerChromiumMac',
      'builder': optional_builders,
      'hostname': slave,
      'os': 'mac',
      'version': '10.8',
      'bits': '64',
    } for slave in optional_slaves
  )
  out.extend(
    {
      'master': 'TryServerChromiumMac',
      'builder': ['mac_chromium_10.10_rel_ng'],
      'hostname': slave,
      'os': 'mac',
      'version': '10.10',
      'bits': '64',
    } for slave in ['vm355-m4', 'vm358-m4']
  )

  return out


def ios():
  compile_slaves = [
    {
      'master': 'TryServerChromiumMac',
      'builder': [
        'ios_dbg_simulator',
        'ios_dbg_simulator_ninja',
        'ios_rel_device',
        'ios_rel_device_ninja',
      ],
      'hostname': 'build%d-a4' % i,
      'os': 'mac',
      'version': '10.8',
    } for i in range(79, 82) + range(83, 99) # Skip 82. http://crbug.com/395099.
  ]

  # TODO(lliabraa): Add test_slaves once we're actually running iOS tests on
  # the bots.

  return compile_slaves


slaves = mac() + ios()
